package com.winning.pmph.vo;
import lombok.Data;
import org.apache.commons.lang.StringUtils;

@Data
public class NameSuggestion {

    private static final long serialVersionUID = 7775229163590542668L;

    /**
     * 未提交
     */
    public final static Integer STATUS_UNCONFIRMED = 0;

    /**
     * 初审中
     */
    public final static Integer STATUS_CONFIRMED = 1;

    /**
     * 初审中
     */
    public final static Integer STATUS_REFUSED = 2;
    /**
     * 编辑人员
     */
    private String editorNameSuggestion;
    /**
     * 初审人员
     */
    private String firstAuditorNameSuggestion;
    /**
     * 复审人员
     */
    private String secondAuditorNameSuggestion;
    /**
     * 终审人员
     */
    private String thirdAuditorNameSuggestion;
    private int editorStatus;
    private int firstAuditorStatus;
    private int secondAuditorStatus;
    private int thirdAuditorStatus;

    public boolean hasUnconfirmedNameSuggestion() {
        return (StringUtils.isNotEmpty(this.getEditorNameSuggestion()) && this.getEditorStatus() == NameSuggestion.STATUS_UNCONFIRMED)
                || (StringUtils.isNotEmpty(this.getFirstAuditorNameSuggestion()) && this.getFirstAuditorStatus() == NameSuggestion.STATUS_UNCONFIRMED)
                || (StringUtils.isNotEmpty(this.getSecondAuditorNameSuggestion()) && this.getSecondAuditorStatus() == NameSuggestion.STATUS_UNCONFIRMED)
                || (StringUtils.isNotEmpty(this.getThirdAuditorNameSuggestion()) && this.getThirdAuditorStatus() == NameSuggestion.STATUS_UNCONFIRMED);
    }
}
